-- this is a code snippet from the manage_dept_proj shown on pages 29 and 30. 
-- this code is not complete and it won't compile. Run the code file code_04_30_n.sql instead.

FUNCTION manipulate_project (p_dept_id NUMBER)
    RETURN typ_projectlist
  IS
    v_accounting_project typ_projectlist;
    v_changed_list typ_projectlist;
  BEGIN
    SELECT  projects INTO  v_accounting_project
       FROM  department WHERE dept_id = p_dept_id; 
  -- this example assigns one collection to another
    v_changed_list := v_accounting_project;
    RETURN v_changed_list;
  END manipulate_project;
